<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
	<%@ include file="include/head.jsp" %>
	<%-- Elementos adicionais head aqui --%>
	<script>
		$(document).ready(function() { 
			$("#birth").datepicker(
				$.extend({}, 
				$.datepicker.regional["pt-BR"],{ 
					dateFormat: "dd/mm/yy",
					yearRange:"-65:+0" 
				})
			);
		});		
	</script>   
	<%@ include file="include/topo.jsp" %>
		<!-- Menu -->
			<%@ include file="include/leftmenu.jsp" %>
		<!-- fim menu -->
	
		<!-- Conteudo -->
		
		<div class="conteudo_2">
			
				<div class="tit"><s:text name="cadastrarusuario.nome" /></div><br />
				<div>
					<s:actionerror/>
					<s:actionmessage/>
				</div>
				<s:form action="adduser.action" onsubmit="return validarCadastro();">
					<div class="form" >
						<div class="lblform">
							<label for="name"><s:text name="nome.nome"/>*</label><br />
							<label for="nick"><s:text name="apelido.nome"/>*</label><br />
							<label for="pass"><s:text name="senha.nome"/></label>*<br />
							<label for="confpass"><s:text name="confsenha.nome"/>*</label><br />
							<label for="mail"><s:text name="email.nome"/>*</label><br />
							<label for="photo"><s:text name="linkfoto.nome"/> &nbsp;</label><br />
							<label for="birth"><s:text name="datanasc.nome"/>*</label><br />
							<label for="selectSchool"><s:text name="escolaridade.nome"/>*</label><br />
							<c:if test="${listprofile != null }">
								<label for="profile"><s:text name="profile.nome"/> &nbsp;</label>
							</c:if>							
						</div>
						<div class="boxform">
							<s:textfield name="user.user_name" id="name" maxlength="50" onfocus="limpaInput(this.id,'Digite seu nome')" onkeyup="inputEval(this.id)" onblur="inputEval(this.id)"/><br />
							<s:textfield name="user.user_nick" id="nick" onfocus="limpaInput(this.id,'Digite seu apelido')" onkeyup="inputEval(this.id)" onblur="inputEval(this.id)"/><br />
							<s:password  name="user.user_password" value="senhasenha" showPassword="true" id="pass" onfocus="limpaInput(this.id,'senhasenha')"  onkeyup="inputEval(this.id)" onblur="inputEval(this.id)"/><br />
							<s:password  value="senhasenha" showPassword="true" name="confpass" id="confpass" onfocus="limpaInput(this.id,'senhasenha')"  onkeyup="inputEval(this.id)" onblur="inputEval(this.id)"/><br />
							<s:textfield name="user.user_email" id="mail" onfocus="limpaInput(this.id,'Digite seu email')" onkeyup="inputEval(this.id)" onblur="inputEval(this.id)"/><br />
							<s:textfield name="user.user_link_photo" id="photo" value="Link para foto" onfocus="limpaInput(this.id,'Link para foto')" /><br />
							<input name="user.user_date_birth" id="birth" value="${data}" maxlength="10" /><br />
							<s:select id="selectSchool" headerValue="--Escolaridade--" headerKey="0" listKey="schooling_id" listValue="schooling_name" name="user.user_schooling.schooling_id" list="listSchooling"/> 
							<c:if test="${listprofile != null }">
								<br />	
								<s:select name="user.user_profile.profile_id" id="profile" headerValue="--Profile--" headerKey="" listKey="profile_id" listValue="profile_name" list="listprofile"></s:select>
							</c:if>
						</div>
						<div class="sbmform">
							<%-- <s:submit value="Cancelar" action="index" /> --%> 
							<s:reset value="limpar"></s:reset>
							<s:submit value="Cadastrar" />
						</div>
					</div>
				</s:form>
		</div>
		<!-- Fim Conteudo -->
		
		<!-- Menu Direito-->
			<%@ include file="include/rightmenu.jsp" %>
		<!-- Fim menu Direito -->
		
	<%@ include file="include/fim.jsp" %>